package net.pimpas.operation.persistence.operation;

import net.pimpas.operation.exception.OperationException;
import net.pimpas.persistence.serviceprovider.PersistenceServiceProvider;

import org.hibernate.Session;

public abstract class OperationPersistenceAbstract<T> implements OperationPersistence<T> {
	
	private PersistenceServiceProvider persistenceServiceProvider;
	private Session session;
	
	public OperationPersistenceAbstract() {
		
	}

	public void commit() throws OperationException {
	}

	public void end() throws OperationException {
	}

	public void init(Object... arg0) throws OperationException {
	}

	public void rollBack() throws OperationException {
	}

	public void start() throws OperationException {
	}

	public T call() throws Exception {
		return null;
	}



	public PersistenceServiceProvider getPersistenceServiceProvider() {
		return this.persistenceServiceProvider;
	}

	public void setPersistenceServiceProvider(PersistenceServiceProvider provider) {
		this.persistenceServiceProvider = provider;
	}

	public Session getSession() {
		return session;
	}

	public void setSession(Session session) {
		this.session = session;
	}
}